package org.gap.jseed.reflect;

import java.lang.annotation.Annotation;

public class ClassReflector {
	private final Class<?> clazz;

	public ClassReflector(Class<?> clazz) {
		this.clazz = clazz;
	}

	public boolean hasClassAnnotation(Class<? extends Annotation> class1) {
		for (Annotation each : classAnnotationIterator()) {
			if (each.annotationType().equals(class1)) {
				return true;
			}
		}
		return false;
	}

	public ClassAnnotationIterator classAnnotationIterator() {
		return new ClassAnnotationIterator(clazz);
	}

	public MethodIterator methodIterator() {
		return new MethodIterator(clazz);
	}
}
